home *** CD-ROM | disk | FTP | other *** search
/ Tripas 5 / TRIPAS 005.iso / Wos.EXE / 2015 / global / universal_script.scr < prev    next >
Encoding:
Text File  |  1999-02-24  |  16.4 KB  |  517 lines

  1. // ------------------------------------------
  2. // ------------------------------------------
  3. // Universal script for all levels
  4. // ------------------------------------------
  5. // ------------------------------------------
  6.  
  7. //------------------------------------------------------
  8. // Write some nonsense cause I have nothing better to do
  9. //------------------------------------------------------
  10. already_got_it:
  11. *1 playsound player/blade/nope.wav
  12. end
  13.  
  14. // ------------------------------------------
  15. // Clear out the player's inventory
  16. // ------------------------------------------
  17. ClearInventory:
  18. *1 take BlueCard 1000
  19. *1 take OrangeCard 1000
  20. *1 take YellowCard 1000
  21. *1 take GreenCard 1000
  22. *1 take KeyRing 1000
  23. *1 take ScubaGear 1000
  24. *1 take MoneyBag 1000
  25. //###
  26. *1 take BlueCraneCard 1000
  27. *1 take OrangeCraneCard 1000
  28. *1 take CraneIdentityCard 1000
  29. *1 take SecurityL1Card 1000
  30. *1 take SecurityOverrideCard 1000
  31. *1 take TerminalAccessCard 1000
  32.  
  33. // clear some game.player_# variables
  34. game.playeritem_BlueCard = 0
  35. game.playeritem_OrangeCard = 0
  36. game.playeritem_YellowCard = 0
  37. game.playeritem_GreenCard = 0
  38. game.playeritem_KeyRing = 0
  39. game.playeritem_ScubaGear = 0
  40. game.playeritem_MoneyBag = 0
  41. game.playeritem_BlueCraneCard = 0
  42. game.playeritem_OrangeCraneCard = 0
  43. game.playeritem_CraneIdentityCard = 0
  44. game.playeritem_SecurityL1Card = 0
  45. game.playeritem_SecurityOverrideCard = 0
  46. game.playeritem_TerminalAccessCard = 0
  47. //###
  48. end
  49.  
  50. // ------------------------------------------
  51. // Start a player with a new episode
  52. // ------------------------------------------
  53. NewEpisode:
  54. *1 health 100
  55. *1 take FlakJacket 200
  56. *1 take FlakPants 200
  57. *1 take RiotHelmet 200
  58. *1 take all
  59. *1 give fists
  60. *1 give Magnum
  61. end
  62.  
  63. // ------------------------------------------
  64. // Mission Status Computer 
  65. // ------------------------------------------
  66. StatusUpdated:
  67.   crucialdialog "i_computer" "Mission Status Updated (TAB)" "mission_comp/update.wav" 1 5
  68.   waitForSound "mission_comp/update.wav" 1
  69. end
  70.  
  71. PObjectiveComplete:
  72.   crucialdialog "i_computer" "Primary Objective Completed" "mission_comp/mix1ima.wav" 1 5
  73.   waitForSound "mission_comp/mix1ima.wav" 1
  74. end
  75.  
  76. SObjectiveComplete:
  77.   crucialdialog "i_computer" "Secondary Objective Completed" "mission_comp/mix1ima.wav" 1 5
  78.   waitForSound "mission_comp/mix1ima.wav" 1
  79. end
  80.  
  81. PObjectiveFailed:
  82.   crucialdialog "i_computer" "Primary Objective Failed" "mission_comp/mix3ima.wav" 1 5
  83.   waitForSound "mission_comp/mix3ima.wav" 1
  84. end
  85.  
  86. SObjectiveFailed: 
  87.   crucialdialog "i_computer" "Secondary Objective Failed" "mission_comp/mix3ima.wav" 1 5
  88.   waitForSound "mission_comp/mix3ima.wav" 1
  89. end
  90.  
  91. // ------------------------------------------
  92. // Blade finds a secret
  93. // ------------------------------------------
  94. secret: 
  95.   local.PrintString string "Secrets Found: "
  96.   local.PrintString appendint level.found_secrets
  97.   local.PrintString append "/"
  98.   local.PrintString appendint level.total_secrets
  99.   crucialdialog "i_computer" local.PrintString "mission_comp/mix1ima.wav" 1 5
  100.   waitForSound "mission_comp/secret.wav" 1
  101. end
  102.  
  103. // ------------------------------------------
  104. // Blade finds a non needed item
  105. // ------------------------------------------
  106. blade_no_reason:
  107.   //Blade says "Hmm, no reason to go in there." when he finds a locked door
  108.   dialog "i_blade" "Hmm, no reason to go in there." "dialog/general/blade/noreas.wav" 1 5
  109. end
  110.  
  111. // ---------------------------------------------------------------
  112. // Blade tries to use an item that needs a keycard he doesn't have
  113. // ---------------------------------------------------------------
  114. need_yellow_card:
  115. dialogsound environment/computer/beeps/affirm3.wav
  116. end
  117.  
  118. need_orange_card:
  119. dialogsound environment/computer/beeps/affirm3.wav
  120. end
  121.  
  122. need_green_card:
  123. dialogsound environment/computer/beeps/affirm3.wav
  124. end
  125.  
  126. need_blue_card:
  127. dialogsound environment/computer/beeps/affirm3.wav
  128. end
  129.  
  130. //###
  131. need_blue_crane_card:
  132. dialogsound environment/computer/beeps/affirm3.wav
  133. end
  134.  
  135. need_orange_crane_card:
  136. dialogsound environment/computer/beeps/affirm3.wav
  137. end
  138.  
  139. need_identity_crane_card:
  140. dialogsound environment/computer/beeps/affirm3.wav
  141. end
  142.  
  143. need_security_l1_card:
  144. dialogsound environment/computer/beeps/affirm3.wav
  145. end
  146.  
  147. need_security_override_card:
  148. dialogsound environment/computer/beeps/affirm3.wav
  149. end
  150.  
  151. need_terminal_access_card:
  152. screenprint 1 "jcx yv 30 string \"You need this:\" jcx jcy picn i_card_terminal_access"
  153. dialogsound environment/computer/beeps/affirm3.wav
  154. end
  155.  
  156. //###
  157.  
  158. // ------------------------------------------
  159. // Blade finds a locked door
  160. // ------------------------------------------
  161. locked_door:
  162.   //Blade says "Another locked door!" when he finds a locked door
  163. dialogsound "dialog/general/blade/nlck.wav"
  164. end
  165.  
  166. // ------------------------------------------
  167. // X-Files Type Intro Screen
  168. // ------------------------------------------
  169. XFilesScreen_Black:
  170.   freezeplayer
  171.   local.WaitTime = parm.WaitTime
  172.   local.TimeDate string parm.TimeDate
  173.   local.Location string parm.Location
  174.   local.Description string parm.Description
  175.   local.PrintString string "fullfill 0 0 0 1"
  176.   local.PrintString append "xl 8 yb 8 type 1 string \""
  177.   local.PrintString append local.TimeDate
  178.   local.PrintString append "\n"
  179.   local.PrintString append local.Location
  180.   local.PrintString append "\n"
  181.   local.PrintString append local.Description
  182.   local.PrintString append "\""
  183.   screenprint 3 "fullfill 0 0 0 1"
  184.   wait 1
  185.   screenprint local.WaitTime local.PrintString
  186.   local.WaitTime -= 1
  187.   wait local.WaitTime
  188.   releaseplayer
  189. end
  190.  
  191. XFilesScreen:
  192.   local.WaitTime = parm.WaitTime
  193.   local.TimeDate string parm.TimeDate
  194.   local.Location string parm.Location
  195.   local.Description string parm.Description
  196.   local.PrintString string "xl 8 yb 8 type 1 string \""
  197.   local.PrintString append local.TimeDate
  198.   local.PrintString append "\n"
  199.   local.PrintString append local.Location
  200.   local.PrintString append "\n"
  201.   local.PrintString append local.Description
  202.   local.PrintString append "\""
  203.   screenprint local.WaitTime local.PrintString
  204.   local.WaitTime -= 1
  205.   wait local.WaitTime
  206. end
  207.  
  208. // ------------------------------------------
  209. // Blade finds items
  210. // ------------------------------------------
  211. //this dialog is good for when Blade blows open a crate and finds guns/ammo, or any similar situation
  212.  
  213. blade_finds_item1:
  214.   //Blade says "Alright!"
  215. //  dialog "i_blade" "Alright!" "dialog/general/blade/Alright.wav" 1 5
  216. dialogsound "dialog/general/blade/Alright.wav"
  217. end
  218.  
  219. blade_finds_item2:
  220.   //Blade says "Come to Papa!"
  221. //  dialog "i_blade" "Come to Papa!" "dialog/general/blade/Papa.wav" 1 5
  222. dialogsound "dialog/general/blade/Papa.wav"
  223. end
  224.  
  225. blade_finds_item3:
  226.   //Blade says "Score!"
  227. //  dialog "i_blade" "Score!" "dialog/general/blade/Score.wav" 1 5
  228. dialogsound "dialog/general/blade/Score.wav"
  229. end
  230.  
  231. // Jc reacts to what Blade finds
  232. blade_finds_item4:
  233.   //JC says "Rock the Casbah!"
  234. //  dialog "i_jc" "Rock the Casbah!" "dialog/general/jc/Paydirt.wav" 1 5
  235. dialogsound "dialog/general/jc/Paydirt.wav"
  236. end
  237.  
  238. blade_finds_item5:
  239.   //JC says "Jackpot!"
  240. //  dialog "i_jc" "Jackpot!" "dialog/general/jc/jackpot.wav" 1 5
  241. dialogsound "dialog/general/jc/jackpot.wav"
  242. end
  243.  
  244. // ------------------------------------------
  245. // Blade dies and JC calls after him
  246. // ------------------------------------------
  247. blade_ponders_item1:
  248.   //Blade says "Hmmm!"
  249.   dialog "i_blade" "Hmmm!" "dialog/bank/blade/hmm.wav" 1 5
  250. end
  251.  
  252. blade_ponders_item2:
  253.   //Blade says "Hmmm, whatÆs that for?"
  254.   dialog "i_blade" "Hmmm, whatÆs that for?" "dialog/geotherm/blade/whatthat.wav" 1 5
  255. end
  256.  
  257. // ------------------------------------------
  258. // Blade dies and JC calls after him
  259. // ------------------------------------------
  260. jc_talks_blade_dies1:
  261.   // JC says "Blade!  Blade, talk to me!"
  262. //  dialog "i_jc" "Blade!  Blade, talk to me!" "dialog/general/jc/bldtlk.wav" 1 5
  263. dialogsound "dialog/general/jc/bldtlk.wav"
  264. end
  265.  
  266. jc_talks_blade_dies2:
  267.   // JC says "Blade...Blade, come in Blade...talk to me!"
  268. //  dialog "i_jc" "Blade...Blade, come in Blade...talk to me!" "dialog/general/jc/cmn2.wav" 1 5
  269. dialogsound "dialog/general/jc/cmn2.wav"
  270. end
  271.  
  272. jc_talks_blade_dies3:
  273.   // JC says "Blade?  Blade? Talk to me man!"
  274. //  dialog "i_jc" "Blade?  Blade? Talk to me man!" "dialog/chem/jc/talkme.wav" 1 5
  275. dialogsound "dialog/chem/jc/talkme.wav"
  276. end
  277.  
  278. jc_talks_blade_dies4:
  279.   // JC says "Blade is down!  Repeat Blade is down!  Get some backup in there now!" 
  280. //  dialog "i_jc" "Blade is down!  Repeat Blade is down!  Get some backup in there now!" "dialog/general/jc/blddw2.wav" 1 5
  281. dialogsound "dialog/general/jc/blddw2.wav"
  282.  
  283. end
  284.  
  285. // ------------------------------------------
  286. // Blade sees Cool Shit happen in level
  287. // ------------------------------------------
  288. Blade_reacts_2_coolshit1:
  289.   // Blade says "OH SHIT!"
  290. //  dialog "i_blade" "OH SHIT!" "dialog/abandoned/blade/ohsht1.wav" 1 5
  291. end
  292.  
  293. Blade_reacts_2_coolshit2:
  294.   // Blade says "Man, this is some pretty fubarÆed shit!"
  295. //  dialog "i_blade" "Man, this is some pretty fubarÆed shit!" "dialog/biomech/blade/fubar.wav" 1 5
  296. end
  297.  
  298. Blade_reacts_2_coolshit3:
  299.   // Blade says "What THE!"
  300. //  dialog "i_blade" "What THE!" "dialog/intro/blade/whtth2.wav" 1 5
  301. end
  302.  
  303. Blade_reacts_2_coolshit4:
  304.   // Blade says "Bring it on!"
  305. //  dialog "i_blade" "Bring it on!" "dialog/basehq/blade/bringon.wav" 1 5
  306. end
  307.  
  308. Blade_reacts_2_coolshit5:
  309.   // Blade says "ItÆs demolition time!"
  310.   dialog "i_blade" "ItÆs demolition time!" "dialog/hdocks/blade/demolit.wav" 1 5
  311. end
  312.  
  313. // ------------------------------------------
  314. // JC sees Cool Shit happen in level
  315. // ------------------------------------------
  316. JC_reacts_2_coolshit1:
  317.   // JC says "Cause a little havoc why donÆt you Blade!"
  318. //  dialog "i_jc" "Cause a little havoc why donÆt you Blade!" "dialog/chem/jc/havoc.wav" 1 5
  319. end
  320.  
  321. JC_reacts_2_coolshit2:
  322.   // JC says "SMOKINÆ!"
  323. //  dialog "i_jc" "SMOKINÆ!" "dialog/basehq/jc/smokin.wav" 1 5
  324. end
  325.  
  326. JC_reacts_2_coolshit3:
  327.   // JC says "Boss youÆre one bad-ass mother!"
  328. // dialog "i_jc" "Boss youÆre one bad-ass mother!" "dialog/basehq/jc/badass.WAV" 1 5
  329. end
  330.  
  331. JC_reacts_2_coolshit4:
  332.   // JC says "Damn Blade, youÆre tearing this place apart!"
  333.   dialog "i_jc" "Damn Blade, youÆre tearing this place apart!" "dialog/geotherm/jc/Tear.wav" 1 5
  334. end
  335.  
  336. JC_reacts_2_coolshit5:
  337.   // JC says "Give emÆ fifty CCÆs of Kick-ass bossman!"
  338. //  dialog "i_jc" "Give emÆ fifty CCÆs of Kick-ass bossman!" "dialog/hdocks/jc/50cc.wav" 1 5
  339. end
  340.  
  341. JC_reacts_2_coolshit6:
  342.   // JC says "TRASH IT! TRASH IT!! TRASH IT!"
  343. //  dialog "i_jc" "TRASH IT! TRASH IT!! TRASH IT!" "dialog/hdocks/jc/trash.wav" 1 5
  344. end
  345.  
  346. // ------------------------------------------
  347. // JC berates Blade for killing innocents
  348. // ------------------------------------------
  349. blade_kills_innocent1:
  350.   // JC says "What are you blind DON'T shoot them!"
  351. //  dialog "i_jc" "What are you blind DON'T shoot them!" "dialog/general/jc/blind.wav" 1 5
  352. dialogsound "dialog/general/jc/blind.wav"
  353. end
  354.  
  355. blade_kills_innocent2:
  356.   // JC says "Blade, what are doing? Those are friendlies!"
  357. //  dialog "i_jc" "Blade, what are doing? Those are friendlies!" "dialog/general/jc/friend1.wav" 1 5
  358. dialogsound "dialog/general/jc/friend1.wav"
  359. end
  360.  
  361. blade_kills_innocent3:
  362.   // JC says "HEY! Easy does it PSYCHO!"
  363. //  dialog "i_jc" "HEY! Easy does it PSYCHO!" "dialog/general/jc/psycho.wav" 1 5
  364. dialogsound "dialog/general/jc/psycho.wav"
  365. end
  366.  
  367. blade_kills_innocent4:
  368.   // JC says "BLADE! What are you doing?"
  369. //  dialog "i_jc" "BLADE! What are you doing?" "dialog/general/jc/whatdo.wav" 1 5
  370. dialogsound "dialog/general/jc/whatdo.wav"
  371. end
  372.  
  373. blade_kills_innocent5:
  374.   // JC says "DAMN BLADE! Watch out?"
  375. //  dialog "i_jc" "DAMN BLADE! Watch out?" "dialog/general/jc/watch6.wav" 1 5
  376. dialogsound "dialog/general/jc/watch6.wav"
  377. end
  378.  
  379. /////////////////////////////////////////////////////////////////////////////
  380. // smoothturn_thread:
  381. // Simulate a smooth moving turn for an object.
  382. // local.TurnTics = number of sub-turns to divide the motion into
  383. // parm.Object = script object to turn
  384. // parm.Radius = radius of the circle to turn on
  385. // parm.Angle = number of degrees to turn
  386. // parm.Speed = speed in units per sec to move
  387. // parm.Direction = [left/right] direction to turn
  388. // parm.YDistance = how far to move up or down while turning
  389. // parm.YDirection = [up/down/nop] tells if the object should slide on the Y
  390. // axis while turning.
  391. /////////////////////////////////////////////////////////////////////////////
  392. smoothturn_thread:
  393.   local.Pi = 3.1415926535
  394.   local.TurnTics = 50
  395.   local.Object string parm.Object
  396.   local.Angle = parm.Angle
  397.   local.Speed = parm.Speed
  398.   local.Counter = 0
  399.   local.TurnDirection string parm.Direction
  400.   local.YDistance = parm.YDistance
  401.   local.YDirection string parm.YDirection
  402.  
  403.   // Find the circumference
  404.   local.TicDistance = local.Pi
  405.   local.TicDistance *= 2
  406.   local.TicDistance *= parm.Radius
  407.  
  408.   // Find the ammount to divide the circumference by
  409.   local.AngleFactor = 360
  410.   local.AngleFactor /= local.Angle
  411.  
  412.   // Total distance in units the object will travel
  413.   local.TicDistance /= local.AngleFactor
  414.  
  415.   // We are givin the speed we wish the object to make the turn at, calculate the time
  416.   local.TicTime = local.TicDistance
  417.   local.TicTime /= local.Speed
  418.   local.TicTime /= local.TurnTics
  419.  
  420.   // Distance and angle the object should move/turn in each itteration
  421.   local.TicDistance /= local.TurnTics
  422.   local.YDistance /= local.TurnTics
  423.   local.TicAngle = local.Angle
  424.   local.TicAngle /= local.TurnTics
  425.  
  426.   // Turn the object
  427.   local.Object time local.TicTime
  428.  
  429. smoothturn_loop:
  430.   local.Object moveForward local.TicDistance
  431.  
  432.   local.TurnDirection ifstrequal "left" local.Object rotateYup local.TicAngle
  433.   local.TurnDirection ifstrequal "right" local.Object rotateYdown local.TicAngle
  434.  
  435.   local.YDirection ifstrequal "up" local.Object moveUp local.YDistance
  436.   local.YDirection ifstrequal "down" local.Object moveDown local.YDistance
  437.  
  438.   waitFor local.Object
  439.  
  440.   local.Counter += 1
  441.   local.Counter ifless local.TurnTics goto smoothturn_loop
  442. end // smoothturn_thread
  443.  
  444. //---------------------------------------------------------------------------
  445. // Returns a number with the specified Significant digits
  446. //---------------------------------------------------------------------------
  447. SigDigits:
  448.   local.OrigFloat = parm.OrigFloat
  449.   local.NumDigits = parm.NumDigits
  450.  
  451.   local.NewFloat string ""
  452.   local.NewFloat appendint local.OrigFloat
  453.   local.NumDigits ifgreater 0 local.NewFloat append "."
  454.  
  455.   local.OnDigit = 0
  456.   local.DigitPlace = 1
  457.  
  458. GetDigit:
  459.   local.OnDigit ifequal local.NumDigits goto GotDigits
  460.   local.OnDigit += 1
  461.   local.TempVal = local.OrigFloat
  462.   local.TempVal *= local.DigitPlace
  463.   local.TempVal1 string ""
  464.   local.TempVal1 appendint local.TempVal
  465.   local.TempVal1 *= 10
  466.   local.DigitPlace *= 10
  467.   local.TempVal = local.OrigFloat
  468.   local.TempVal *= local.DigitPlace
  469.   local.TempVal2 string ""
  470.   local.TempVal2 appendint local.TempVal
  471.   local.TempVal2 -= local.TempVal1
  472.   local.NewFloat appendint local.TempVal2
  473.   goto GetDigit
  474.  
  475. GotDigits:
  476.   parm.NewFloat string local.NewFloat
  477. end
  478.  
  479. // ------------------------------------------
  480. // Sound Precache Section
  481. // ------------------------------------------
  482.  
  483. precache:
  484.      cachesound "dialog/bank/blade/hmm.wav"
  485.      cachesound "dialog/chem/jc/talkme.wav"
  486.      cachesound "dialog/general/blade/Alright.wav"
  487.      cachesound "dialog/general/blade/Papa.wav"
  488.      cachesound "dialog/general/blade/Score.wav"
  489.      cachesound "dialog/general/blade/nlck.wav"
  490.      cachesound "dialog/general/blade/noreas.wav"
  491.      cachesound "dialog/general/jc/Paydirt.wav"
  492.      cachesound "dialog/general/jc/blddw2.wav"
  493.      cachesound "dialog/general/jc/bldtlk.wav"
  494.      cachesound "dialog/general/jc/blind.wav"
  495.      cachesound "dialog/general/jc/cmn2.wav"
  496.      cachesound "dialog/general/jc/friend1.wav"
  497.      cachesound "dialog/general/jc/jackpot.wav"
  498.      cachesound "dialog/general/jc/psycho.wav"
  499.      cachesound "dialog/general/jc/watch6.wav"
  500.      cachesound "dialog/general/jc/whatdo.wav"
  501.      cachesound "dialog/geotherm/blade/whatthat.wav"
  502.      cachesound "dialog/geotherm/jc/Tear.wav"
  503.      cachesound "dialog/hdocks/blade/demolit.wav"
  504.      cachesound "environment/computer/beeps/affirm3.wav"
  505.      cachesound "mission_comp/mix1ima.wav"
  506.      cachesound "mission_comp/mix3ima.wav"
  507.      cachesound "mission_comp/secret.wav"
  508.      cachesound "mission_comp/update.wav"
  509. end
  510.  
  511. // ------------------------------------------
  512. // End of File
  513. // ------------------------------------------
  514.  
  515.  
  516.  
  517.